#include <bits/stdc++.h>
using namespace std;

int x,y;
int arr[40][40];
int main(){
    cin>>x>>y;
    for (int i = 1; i <= x; ++i)
        arr[i][1]=1;
    for (int j = 1; j <= y; ++j)
        arr[1][j]=1;
    for (int i = 2; i <= x; ++i)
        for (int j = 2; j <= y; ++j)
            arr[i][j]=arr[i-1][j]+arr[i][j-1];
    cout<<arr[x][y]<<endl;
    return 0;
}